package com.agriculture.monitor.service.impl;

import com.agriculture.monitor.dto.BasePage;
import com.agriculture.monitor.entity.Collect;
import com.agriculture.monitor.entity.Device;
import com.agriculture.monitor.mapper.CollectMapper;
import com.agriculture.monitor.service.ICollectService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author admin
 * @since 2024-04-15
 */
@Service
public class CollectServiceImpl extends ServiceImpl<CollectMapper, Collect> implements ICollectService {

    @Override
    public Page<Collect> listPage(BasePage basePage) {
        Page<Collect> page = new Page(basePage.getPageCurrent(), basePage.getPageSize());
        baseMapper.findPage(page, null);
        return page;
    }

    @Override
    public List<Collect> findList(Collect collect) {
        return baseMapper.findList();
    }
}
